package com.start_eternity.oasissafewalk.controller;

import com.start_eternity.oasissafewalk.pojo.FeedBack;
import com.start_eternity.oasissafewalk.pojo.Result;
import com.start_eternity.oasissafewalk.service.FeedBackService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * author:ZhangT
 * Date:2024 / 03 / 10 / 17:24
 * Description:
 */
@Slf4j
@RestController
@RequestMapping("feedback")
public class FeedBackController {

    @Autowired
    private FeedBackService feedBackService;

    @RequestMapping
    public Result saveFeedback(@RequestBody FeedBack feedBack) {
        feedBackService.insert(feedBack);
        return Result.success(feedBack);
    }

}
